This repository was archived by the owner on Nov 30, 2024. It is now read-only.
Conversation
1 task
721bcc2 to
ad6e0cc
Compare
1 task
0ce50c9 to
2b5a8e9
Compare
http://rspec.info/blog/2013/07/the-plan-for-rspec-3/#zero_monkey_patching_mode > we do want to encourage people to switch to the new syntax, so we plan to make RSpec 3 print a warning on first usage of any the old syntax methods (should, should_not, should_receive, etc) unless the should syntax has been explicitly enabled. This should nudge folks towards the new syntax while keeping RSpec friendly to new users and will pave the way for the old syntax to be disabled by default in RSpec 4. > zero-monkey-patching mode for RSpec... We plan for these config options to become the defaults in RSpec 4.0, so that RSpec 4.0 will have zero monkey patching out of the box. As for "disabled by default" vs "completely removed" and "default, out of the box" vs "impossible" I can only say that RSpec 4 was probably planned to be released earlier, as: > we'll probably be dropping support for 1.8.7 in RSpec 4 but we've also dropped 1.9, 2.0, 2.1 and 2.2 rspec/rspec-core#2301 (comment) > In RSpec 4, we plan to extract all monkey patching from RSpec and move it into a separate gem, so that monkey patching is opt-in instead of opt-out and users have to explicitly install and load a gem to get it. `rspec-should` (or `rspec-monkey` as it's also about exposing example group DSL in the top-level/Module?) will be released later. Those using the monkey-patched `should` syntax are not encouraged to update to RSpec 4 until this gem is extracted.
2b5a8e9 to
128f9b2
Compare
f27186d to
128f9b2
Compare
JonRowe
approved these changes
Dec 22, 2020
001fff4 to
128f9b2
Compare
JonRowe
reviewed
Dec 23, 2020
maintenance-branch
Outdated
| @@ -1 +1 @@ | |||
| 4-0-dev No newline at end of file | |||
| remove-monkey-patching | |||
Member
Author
There was a problem hiding this comment.
Core should be merged first.
Core's 4-0-dev has this:
RSpec::Mocks.configuration.tap do |config|
config.syntax = :expectand would fail if this was merged first.
Core's remove-monkey-patching's specs pass when run against 4-0-dev of Mock and Expectations.
Mocks and Expectations' PRs can be merged in any order.
Member
There was a problem hiding this comment.
Ah ok, this explanation resolves a point I had on core, in future it'd be useful if this sort of explicit information is in the PR description, or commented on the branch like this so people know why, I have an alternate solution.
128f9b2 to
930b8cc
Compare
Member
|
Merging as build failure is rspec-rails on Ruby 3.1 (head) due to no available minitest version. |
yujinakayama
pushed a commit
to yujinakayama/rspec-monorepo
that referenced
this pull request
Oct 19, 2021
…onkey-patching Scrape out monkey patching --- This commit was imported from rspec/rspec-mocks@ef886d3.
Merged
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sibling PRs:
Prerequisite PRs:
Stop using globally exposed DSL rspec-rails#2420
Use globally unexposed DSL rspec-support#457
Add a check to support both RSpec 3 & 4 rspec-rails#2425
Remove temporary commit. CI is expected to fail on Core/Mocks/Support/Rails steps, as
disable_monkey_patching!calls methods that were removed with no replacement. I'll use themaintenance-branchtemporary commit hack to fraternize those sibling PRs.http://rspec.info/blog/2013/07/the-plan-for-rspec-3/#zero_monkey_patching_mode
As for "disabled by default" vs "completely removed" and "default, out of the box" vs "impossible" I can only say that RSpec 4 was probably planned to be released earlier, as:
but we've also dropped 1.9, 2.0, 2.1 and 2.2
rspec/rspec-core#2301 (comment)
rspec-should(orrspec-monkeyas it's also about exposing example group DSL in the top-level/Module?) will be released later.Those using the monkey-patched
shouldsyntax are not encouraged to update to RSpec 4 until this gem is extracted.